Matplotlib transformed unixtime in candlesticks_ohlc gives unsupported operand type(s) for - datetime.datetime and float
Thank you very much for making such valuable python programming resource. In your matplotlib tutorials you explained how to transform Unix time stamp to better format by using vectorize(dt.datetime.fromtimestamp). After transformation, I was trying to use dates to make a candlesticks chart, but faced the error above (unsupported operand type(s) for -: 'datetime.datetime' and 'float'). Would you please explain how to fix the error. Thank you. P.S. I am using Python 2.7
You must be logged in to post. Please login or register an account.
I'd need to see the code, edit that in or post it.
-Harrison 9 years ago
You must be logged in to post. Please login or register an account.
Hello, again!! Here is the code
Here I am reading data from MetaTrader4 and converting to format like this: datetime.datetime(2016, 3, 24, 2, 15)